package unknow.operation;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Description：
 * @Author：LiDong
 * @Create：2021/3/17
 * @Version：1.0.0
 */
public class JavaOpertionTest {

    private static final Logger logger = LoggerFactory.getLogger(JavaOpertionTest.class);

    /**
     * 先赋值 在进行自加操作
     */
    @Test
    public void test1() {
        int i = 3;
        i++;
        logger.info(String.valueOf(i));
    }


    /**
     * 先运算 在赋值
     */
    @Test
    public void test2() {
        int i = 3;
        i = ++i;
        logger.info(String.valueOf(i));
    }

}
